import { REGEX_NUM_MIN } from '@/utils/validate'

const rules = {
  giveDescription: [
    {
      required: true,
      message: '请输入评价赠送积分说明',
      trigger: 'blur'
    },
    {
      max: 500,
      message: '评价赠送积分说明在500字以内',
      trigger: 'blur'
    }
  ],
  giveAmount: [
    {
      required: true,
      message: '请输入赠送条件字数',
      trigger: 'blur'
    },
    {
      pattern: REGEX_NUM_MIN,
      message: '请输入1-9999之间的正整数',
      trigger: 'blur'
    }
  ],
  giveMinAmount: [
    {
      required: true,
      message: '请输入积分赠送最小值',
      trigger: 'blur'
    },
    {
      pattern: REGEX_NUM_MIN,
      message: '请输入1-9999之间的正整数',
      trigger: 'blur'
    }
  ],
  giveMaxAmount: [
    {
      required: true,
      message: '请输入积分赠送最大值',
      trigger: 'blur'
    },
    {
      pattern: REGEX_NUM_MIN,
      message: '请输入1-9999之间的正整数',
      trigger: 'blur'
    }
  ],
  wordMinLimit: [
    {
      required: true,
      message: '请输入文字限制数量',
      trigger: 'blur'
    }
  ],
  imageMinLimit: [
    {
      required: true,
      message: '请输入图片限制数量',
      trigger: 'blur'
    }
  ]
}

export default rules
